import 'package:kkhousekeep/generated/json/base/json_convert_content.dart';
import 'package:kkhousekeep/models/notice_list_entity.dart';

NoticeListEntity $NoticeListEntityFromJson(Map<String, dynamic> json) {
	final NoticeListEntity noticeListEntity = NoticeListEntity();
	final int? code = jsonConvert.convert<int>(json['code']);
	if (code != null) {
		noticeListEntity.code = code;
	}
	final NoticeListObj? obj = jsonConvert.convert<NoticeListObj>(json['obj']);
	if (obj != null) {
		noticeListEntity.obj = obj;
	}
	final String? msg = jsonConvert.convert<String>(json['msg']);
	if (msg != null) {
		noticeListEntity.msg = msg;
	}
	return noticeListEntity;
}

Map<String, dynamic> $NoticeListEntityToJson(NoticeListEntity entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['code'] = entity.code;
	data['obj'] = entity.obj.toJson();
	data['msg'] = entity.msg;
	return data;
}

NoticeListObj $NoticeListObjFromJson(Map<String, dynamic> json) {
	final NoticeListObj noticeListObj = NoticeListObj();
	final List<NoticeListObjList>? list = jsonConvert.convertListNotNull<NoticeListObjList>(json['list']);
	if (list != null) {
		noticeListObj.list = list;
	}
	final int? total = jsonConvert.convert<int>(json['total']);
	if (total != null) {
		noticeListObj.total = total;
	}
	return noticeListObj;
}

Map<String, dynamic> $NoticeListObjToJson(NoticeListObj entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['list'] =  entity.list.map((v) => v.toJson()).toList();
	data['total'] = entity.total;
	return data;
}

NoticeListObjList $NoticeListObjListFromJson(Map<String, dynamic> json) {
	final NoticeListObjList noticeListObjList = NoticeListObjList();
	final int? id = jsonConvert.convert<int>(json['id']);
	if (id != null) {
		noticeListObjList.id = id;
	}
	final String? title = jsonConvert.convert<String>(json['title']);
	if (title != null) {
		noticeListObjList.title = title;
	}
	final String? publisher = jsonConvert.convert<String>(json['publisher']);
	if (publisher != null) {
		noticeListObjList.publisher = publisher;
	}
	final String? context = jsonConvert.convert<String>(json['context']);
	if (context != null) {
		noticeListObjList.context = context;
	}
	final int? views = jsonConvert.convert<int>(json['views']);
	if (views != null) {
		noticeListObjList.views = views;
	}
	final String? publishTime = jsonConvert.convert<String>(json['publishTime']);
	if (publishTime != null) {
		noticeListObjList.publishTime = publishTime;
	}
	final String? createTime = jsonConvert.convert<String>(json['createTime']);
	if (createTime != null) {
		noticeListObjList.createTime = createTime;
	}
	final String? updateTime = jsonConvert.convert<String>(json['updateTime']);
	if (updateTime != null) {
		noticeListObjList.updateTime = updateTime;
	}
	final int? cid = jsonConvert.convert<int>(json['cid']);
	if (cid != null) {
		noticeListObjList.cid = cid;
	}
	final int? read = jsonConvert.convert<int>(json['read']);
	if (read != null) {
		noticeListObjList.read = read;
	}
	return noticeListObjList;
}

Map<String, dynamic> $NoticeListObjListToJson(NoticeListObjList entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['id'] = entity.id;
	data['title'] = entity.title;
	data['publisher'] = entity.publisher;
	data['context'] = entity.context;
	data['views'] = entity.views;
	data['publishTime'] = entity.publishTime;
	data['createTime'] = entity.createTime;
	data['updateTime'] = entity.updateTime;
	data['cid'] = entity.cid;
	data['read'] = entity.read;
	return data;
}